<?php

namespace App\Modules\Admin\Entities\Log;

use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlResponseBody\data;
use App\Models\Model;

class UserScoreLogModel extends Model
{
    protected $table='user_scores_log';




    public function setScoreLogCreate($type,$data){
        $score = $data['score'];
        $dec = '【'.$data['title'].'】,增加分数为：+'.$score;
        $log_data=[
            'type'=>$type,
            'month'=>date('Y-m-d',$data['gift_time']),
            'gift_id'=>$data['gift_id'],
            'water_id'=>$data['water_id'],
            'proportion'=>$data['proportion'],
            'user_id'=>$data['user_id'],
            'gift_time'=>$data['gift_time'],
            'sum_score'=>$data['sum_score'],
            'score'=>$data['score'],
            'balance'=>$data['balance'],
            'des'=>$dec,
            'spread_uid'=>$data['spread_uid'],
            'manage_ratio'=>$data['manage_ratio'],
            'manage_score'=>$data['manage_score'],
        ];
        $this->create($log_data);
    }

}
